<template>
	<div>
		<ul>
			<li v-for="item in list" :key="item.id">
				{{item.id}}----{{item.name}}
			</li>
		</ul>
		<h2 @click="sent">点我传值给父组件</h2>
		{{$route.query}}
	</div>
</template>

<script>
	export default{
		props:["list"],
		data:function(){
			return{
				text:"~~~~我是子组件的值"
			}
		},
		methods:{
			sent:function(){
				this.$emit("sento",this.text)
			}
		}
	}
</script>

<style>
</style>
